import streamlit as st

if "count" not in st.session_state:
    st.session_state.count = 0

#方式1
# empty_show = st.empty()
#
# if st.button("increase"):
#     st.session_state.count += 1
#
# empty_show.write(f"current count is {st.session_state.count}")


#方式2
st.write(f"current count is {st.session_state.count}")

if st.button("increase"):
    st.session_state.count += 1
    st.rerun()

